<!-- 顾客登录页面 -->
<?php
// 引入登录脚本
include('login_customer.php');

// 如果用户已经登录，则重定向到主页
if (isset($_SESSION['login_customer'])) {
    header("location: index.php");
}
?>

<!DOCTYPE html>
<html>
<style>
    /* 背景图片 */
    #bgimg-1 {
        position: relative;
        opacity: 0.8;
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        border-radius: 90px;
    }

    #bgimg-1 {

        background-image: url(./assets/img/customer_login.gif);
        min-height: 100%;
    }
</style>

<head>
    <title> 用户登录 | 租车服务 </title>
</head>
<link rel="shortcut icon" type="image/png" href="assets/img/P.png.png">
<link rel="stylesheet" type="text/css" href="assets/css/customerlogin.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="assets/w3css/w3.css">


<body background="assets/img/blank.png">
    <!-- 导航栏 -->
    <?php
    include './nav.php';
    ?>


    <div class="container">
        <div class="jumbotron" id="bgimg-1">
            <h1 class="text-center">租车服务 - 客户面板 </span>
            </h1>
            <br>
            <p class="text-center">请登录以继续。</p>
        </div>
    </div>

    <div class="container" style="margin-top: -2%; margin-bottom: 2%;">
        <div class="col-md-5 col-md-offset-4">
            <label style="margin-left: 5px;color: red;"><span> <?php echo $error;  ?> </span></label>
            <div class="panel panel-primary">
                <div class="panel-heading"> 登录 </div>
                <div class="panel-body">
                    <form action="" method="POST">
                        <div class="row">
                            <div class="form-group col-xs-12">
                                <label for="customer_username"><span class="text-danger" style="margin-right: 5px;">*</span> 用户名: </label>
                                <div class="input-group">
                                    <input class="form-control" id="customer_username" type="text" name="customer_username" placeholder="用户名" required="" autofocus="">
                                    <span class="input-group-btn">
                                        <label class="btn btn-primary"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></label>
                                    </span>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="form-group col-xs-12">
                                <label for="customer_password"><span class="text-danger" style="margin-right: 5px;">*</span> 密码: </label>
                                <div class="input-group">
                                    <input class="form-control" id="customer_password" type="password" name="customer_password" placeholder="密码" required="">
                                    <span class="input-group-btn">
                                        <label class="btn btn-primary"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></label>
                                    </span>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="form-group col-xs-4">
                                <button class="btn btn-primary" name="submit" type="submit" value=" 登录 ">提交</button>
                            </div>
                        </div>
                        <label style="margin-left: 5px;">或</label> <br>
                        <label style="margin-left: 5px;"><a href="customersignup.php">创建新账户。</a></label>
                    </form>
                </div>
            </div>
        </div>
    </div>
</body>
<!-- 底部 -->
<footer class="site-footer">
    <div class="container">
        <hr>
        <div class="row">
            <div class="col-sm-6">
                <h5>© <?php echo date("Y"); ?> 租车服务</h5>
            </div>
        </div>
    </div>
</footer>

</html>